package com.fractalist.base.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.http.HttpServlet;

import com.fractalist.base.cache.Cache;

@SuppressWarnings("serial")
public class InitListener extends HttpServlet implements ServletContextListener {
	public void contextDestroyed(ServletContextEvent sce) {
		Cache.stop();
	}

	public void contextInitialized(ServletContextEvent sce) {
		// 级别最高，会在加载ehcahe以及InitServlet前
		Cache.init();
	}

}
